{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Vaex - Out of core dataframes\n",
    " * vaex\n",
    "  * https://github.com/vaexio/vaex\n",
    "  * http://vaex.io\n",
    "\n",
    "Install from conda:\n",
    "\n",
    "```\n",
    "$ conda install -c conda-forge vaex\n",
    "```\n",
    "\n",
    "or pip\n",
    "```\n",
    "$ pip install vaex\n",
    "```\n",
    "\n",
    "Get some data at: https://docs.vaex.io/en/latest/datasets.html\n",
    "\n",
    "Or try out the remote dataframe server: http://dataframe.vaex.io/"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import vaex"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = vaex.open('ws://dataframe.vaex.io/yellow_taxi_2009_2015_f32')\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# zoom in region (since this is a dirty dataset with many outliers)\n",
    "limits = [\n",
    "    (-74.58162065531823, -72.98973106619209),\n",
    "    (39.95576227783618, 41.56497466621446)\n",
    "]\n",
    "heatmap = df.widget.heatmap(df.pickup_longitude, df.pickup_latitude, transform='log', shape=400, limits=limits)\n",
    "heatmap"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "widgets-tutorial",
   "language": "python",
   "name": "widgets-tutorial"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
